package ddd2bank;

import java.time.LocalDate;

public class Deposit {
    private double depositAmount;
    private int depositTerm;
    private String status;
    private LocalDate saveDate;
    private double withDrawableAmount;

    public double getDepositAmount() {
        return depositAmount;
    }

    public LocalDate getSaveDate() {
        return saveDate;
    }

    public void setSaveDate(LocalDate saveDate) {
        this.saveDate = saveDate;
    }

    public void setDepositAmount(double depositAmount) {
        this.depositAmount = depositAmount;
    }

    public int getDepositTerm() {
        return depositTerm;
    }

    public void setDepositTerm(int depositTerm) {
        this.depositTerm = depositTerm;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public double getWithDrawableAmount() {
        return withDrawableAmount;
    }

    public void setWithDrawableAmount(double withDrawableAmount) {
        this.withDrawableAmount = withDrawableAmount;
    }

    public Deposit() {
        this.status = "未到期";
    }
    public void take(double amount) {
        this.depositAmount = amount;
        this.withDrawableAmount = amount;
    }
}
